import { MyAppType } from "@/router/type";
import { lazy } from "react";
import WithLoading from "@/layout/WithLoading";
import { HomeOutlined } from "@ant-design/icons";

const HomeOne = lazy(() => import("@/views/Home/HomeOne"));
const HomeTwo = lazy(() => import("@/views/Home/HomeTwo"));

const home: MyAppType = {
  path: "/home",
  name: "home",
  meta: {
    icon: <HomeOutlined />,
    title: "知识回顾",
    order: 1,
  },
  children: [
    {
      path: "one",
      name: "homeOne",
      element: WithLoading(<HomeOne />),
      meta: {
        title: "路由一",
      },
    },
    {
      path: "two",
      name: "homeTwo",
      meta: {
        title: "路由二",
      },
      element: WithLoading(<HomeTwo />),
    },
  ],
};

export default home;
